home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Games / SprocketInvaders / Source / CD_Utils.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  2.6 KB  |  97 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        CD_Utils.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     File Ownership:
  11.  
  12.         DRI:                xxx put dri here xxx
  13.  
  14.         Other Contact:        xxx put other contact here xxx
  15.  
  16.         Technology:            xxx put technology here xxx
  17.  
  18.     Writers:
  19.  
  20.         (cjd)    Chris De Salvo
  21.  
  22.     Change History (most recent first):
  23.  
  24.        <SP1>     1/29/99    cjd        first checked in
  25. */
  26.  
  27. //•    ——————————————————————————————————————————————————————————————————————————————————————————    •
  28. //•
  29. //•    Copyright © 1997 Apple Computer, Inc., All Rights Reserved
  30. //•
  31. //•
  32. //•        You may incorporate this sample code into your applications without
  33. //•        restriction, though the sample code has been provided "AS IS" and the
  34. //•        responsibility for its operation is 100% yours.  However, what you are
  35. //•        not permitted to do is to redistribute the source as "DSC Sample Code"
  36. //•        after having made changes. If you're going to re-distribute the source,
  37. //•        we require that you make it clear in the source that the code was
  38. //•        descended from Apple Sample Code, but that you've made changes.
  39. //•
  40. //•        Authors:
  41. //•            Chris De Salvo        <mailto:desalvo@apple.com>
  42. //•
  43. //•    ——————————————————————————————————————————————————————————————————————————————————————————    •
  44.  
  45. #ifndef __CDUTILS__
  46. #define __CDUTILS__
  47.  
  48. //•    ——————————————————————————————    Includes
  49. //•    ——————————————————————————————    Public Definitions
  50.  
  51. //•    Audio playback modes
  52. #define playmodeMute                0x00
  53. #define playmodeRightOnly            0x05
  54. #define playmodeStereo                0x09
  55. #define playmodeLeftOnly            0x0A
  56. #define playmodeMono                0x0F
  57.  
  58. //•    Values that can be returned when you ask
  59. //•    for the speed of the spindle
  60. #define kSingleSpeed                0x00
  61. #define kDoubleSpeedOrGreater        0xFF
  62.  
  63. //•    ——————————————————————————————    Public Types
  64.  
  65. typedef enum
  66. {
  67.     isOnCDErr = -1,
  68.     isOnCDFalse,
  69.     isOnCDTrue
  70. } IsOnCDResult;
  71.  
  72. //•    ——————————————————————————————    Public Variables
  73. //•    ——————————————————————————————    Public Functions
  74.  
  75. #ifdef __cplusplus
  76. extern "C" {
  77. #endif
  78.  
  79. extern OSErr        CD_Open(void);
  80. extern SInt16        CD_GetSpeed(void);
  81. extern OSErr        CD_PlayAudioTrack(UInt8 trackNumber, UInt8 playMode, Boolean inAsync);
  82. extern OSErr        CD_StopAudioTrack(Boolean inAsync);
  83. extern OSErr        CD_GetCurrentAudioTrack(SInt16 *theTrack);
  84. extern IsOnCDResult    CD_IsFileOnCD(SInt16 fileRef);
  85. extern Boolean        CD_IsCDInserted(void);
  86. extern SInt16        CD_GetNumTracks(void);
  87. extern Boolean        CD_IsCDPlaying(void);
  88. extern OSErr        CD_SetVolume(UInt8 left, UInt8 right);
  89. extern void            CD_WaitOnPlayAsyncCalls(void);
  90. extern void            CD_WaitOnStopAsyncCalls(void);
  91. extern void         CD_Eject(void);
  92.  
  93. #ifdef __cplusplus
  94. }
  95. #endif
  96.  
  97. #endif